import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import java.io.IOException;

public class JGI_Adjustmentlistener implements AdjustmentListener 
{
	JAPI_SocketOutputStream JGI_actionstream;
	int JGI_id;		
	int debuglevel=0;	

	public JGI_Adjustmentlistener(int object_id, JAPI_SocketOutputStream action ) 
	throws IOException
	{
		JGI_actionstream=action;
		JGI_id = object_id;		
	}

	public void adjustmentValueChanged(AdjustmentEvent e)
	{
		if(debuglevel > 1) System.out.println("Adjustment Event in Object : "+this.JGI_id);	
		try
		{	
			JGI_actionstream.sendInt(JGI_id);
		}	
		catch(IOException exce) {}		
	}
	
	public void setdebuglevel(int level)
	{
		debuglevel=level;
	}
}